<?php 
 header("content/type:text/html;charset=utf-8");
 // var_dump($data);

 ?>

<!DOCTYPE html>
<html>
<head>
  <meta charset="UTF-8">
	<title></title>
</head>
<body>


 <div class="container-fluid col-md-offset col-md-11">
 <center><p class="bg-primary">视频信息列表</p></center>
 <table align="center"class="table table-striped " border=1 >
 <tr class="success">
   <th width="80">视频编号</th>
   <th width="80">视频名</th>
   <th width="80">类型名</th>
   <th width='80'>海报</th>
   <th width="120">视频介绍</th>   
   <th width="150">下载日期</th>
   <th width="80">下载次数</th>
   <th width="80">点击率</th>
   <th width="80">下载次数</th>
   <th width="80">地址</th>
   <th width="100">操作 <a href="index.php?c=video&m=videoform">添加</a></th>
 </tr>

 <?php
 foreach ($data['videos'] as $row){
   echo '<tr>';
   echo '<td>'.$row['vid'].'</td>';
   echo '<td>'.$row['videoname'].'</td>';
   switch($row['tid']){
    case '1':$dg="电影";break;
    case '2':$dg="电视剧";break;
    case '3':$dg="动画片";break;
    case '4':$dg="爱情片";break;
    case '5':$dg="悬疑片";break;
    default:$dg="不知道";
    }
   echo '<td>'.$dg.'</td>';
   echo '<td align="center"><img class="img-circle" src='.'upload/'.$row['pic'].' width=60 height=60 alt="无头像"></td>';
   echo '<td>'.$row['intro'].'</td>';
   echo '<td>'.$row['uploaddate'].'</td>';
   echo '<td>'.$row['uploadadmin'].'</td>';
   echo '<td>'.$row['hittimes'].'</td>';
   echo '<td>'.$row['downtimes'].'</td>';
   echo '<td>'.$row['address'].'</td>';
   
   echo '<td><a href="index.php?c=video&m=editvideos&vid='.$row['vid'].'">修改</a>|<a href="index.php?c=video&m=delVideo&vid='.$row['vid'].'" onClick="return confirm(\'确定要删除吗？\');">删除</a></td>';
   echo "</tr>";
}
    echo '</table>';
 
?>
</tr></table>


</body>
</html>


           